package com.yao.cardrule;

public class CardRule {
	
	public static final String DOT = ",";

    /**
     * 卡片读取规则1 
     * xxx.xxxxx
     * @param src
     * @return
     */
    public static String carNumRuleOne(String src){
   	 
   	 if(src == null || "".equals(src) || src.length() < 10){
   		 return null;
   	 }
   	 
   	 String firstStr = src.substring(src.length()-6, src.length()-4);
   	 
   	 String lastStr = src.substring(src.length()-4, src.length());
   	 
   	 StringBuffer sb = new StringBuffer(Integer.toString((Integer.parseInt(firstStr,16))));
   	 sb.append(DOT);
   	 sb.append(Integer.toString((Integer.parseInt(lastStr,16))));
   	 
   	 
   	 return sb.toString();
    }


}
